<div id="message">
	<div class="message_head">
		<%= link_to '发送短消息', :controller => :message, :action => :send_message %>
		<%= link_to '我的短消息', :controller => :message, :action => :inbox %>
	</div>
	<div>	
	    <ul>
	    	<%@length = @login_user.rmessages.select{|m| m.is_read==0}.length%>
			<%@text = @length ==0 ? "":"[#{@length}]"%>
	        <li><%= link_to "收件箱#{@text}", :controller => :message, :action => :inbox %></li>
	        <li><%= link_to "已发送", :controller => :message, :action => :outbox %></li>
			<li><%= link_to "垃圾箱", :controller => :message, :action => :trashbox%></li>
	    </ul>
	</div>
	<div>
		<% @txt = @login_user == @message.suser ? "我发给#{@message.ruser.username}的消息" : "#{@message.suser.username}发给我的消息" %>
		<span><%=@message.created_at.to_date.to_s%></span><span><%= @txt%></span>
		<div>
			<p>正文：</p>
			<%= @message.content%>
		</div>
	</div>
	
</div>